// 清运管理相关类型定义

// 满溢状态
export enum OverflowStatus {
  NORMAL = 'normal',      // 正常
  NEAR_FULL = 'near_full', // 接近满溢
  FULL = 'full'           // 已满溢
}

// 清运任务状态
export enum CleanupStatus {
  Pending = 'pending',    // 待清运
  Completed = 'completed' // 已清运
}

// 清运任务
export interface CleanupTask {
  id: number
  taskCode: string
  deviceCode: string
  deviceLocation: string
  area: string
  wasteType: 'paper' | 'textile' | 'mixed'
  overflowStatus: OverflowStatus
  currentWeight: number
  maxCapacity: number
  cleanupStaffId: number
  cleanupStaffName: string
  cleanupStaffPhone: string
  status: CleanupStatus
  notes?: string
  createdAt: string
  updatedAt: string
}

// 清运任务查询表单
export interface CleanupTaskQuery {
  deviceCode?: string
  area?: string
  cleanupStaffName?: string
  status?: CleanupStatus
  page: number
  size: number
}

// 清运任务表单
export interface CleanupTaskForm {
  deviceCode: string
  cleanupStaffId: number
  notes?: string
}

// 清运任务统计
export interface CleanupTaskStats {
  totalTasks: number
  pendingTasks: number
  completedTasks: number
  todayTasks: number
}

// 清运员信息
export interface CleanupStaff {
  id: number
  name: string
  phone: string
  area: string
  assignedCount: number
  status: 'active' | 'inactive'
  createdAt: string
}

// 清运分配记录
export interface CleanupAssignment {
  id: number
  staffId: number
  staffName: string
  deviceId: number
  deviceCode: string
  deviceLocation: string
  assignedAt: string
  status: 'assigned' | 'completed' | 'cancelled'
}

// 清运分配表单
export interface CleanupAssignmentForm {
  staffId?: number
  deviceIds?: number[]
  remark?: string
}

// 清运分配搜索表单
export interface CleanupAssignmentSearchForm {
  staffName?: string
  deviceCode?: string
  area?: string
  status?: string
  page: number
  size: number
}

// 清运分配列表响应
export interface CleanupAssignmentListResponse {
  list: CleanupAssignment[]
  total: number
  page: number
  size: number
}

// 清运员列表响应
export interface CleanupStaffListResponse {
  list: CleanupStaff[]
  total: number
  page: number
  size: number
}
